# Auter: Qiuzhen
# Date: week07

goods = [
    ["10001","python课本","88"],
    ["10002","蜜雪冰城—冰茶","10"],
    ["10003","iphone13 pro","9999"],
    ["10004","华为电-跑车","400000"],
    ["10005","小米手环","199"]
]
user_shop_list = []

支付宝余额 = input("请输入您的余额：")
info = '''------goods list-------
%s
%s
%s
%s
%s
'''%(goods[0],goods[1],goods[2],goods[3],goods[4])
print(info)
user_input_ID = input("请输入商品的ID：")
for good in goods:
    print(good)
    # 判断商品的id是否正确
    if user_input_ID == good[0]:
        # 判断用户的余额是否够用
        if int(good[2]) < int(支付宝余额):
            # 把商品加进list
            user_shop_list.append(good)
            # 扣除支付宝余额
            break

    else:
        print("您输入的商品信息有问题，请输入正确的商品ID")

print(user_shop_list)
["10001","python课本","88"],
["10002","蜜雪冰城—冰茶","10"],


